/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pb138.mathml_tools.old;

import java.util.Set;
import java.util.Map;

/**
 * MathMLDocumentInterface provides basic functionality for normalization of
 * MathML documents, ranging from removing elements with given name through
 * removing all elements defined (where?) as formatting elements to removing all
 * attributes.
 * 
 * @author Richard
 */
public interface MathMLDocumentInterface {
    
    /**
     * removeElements searches the document for all elements with names that are
     * in attribute names and deletes them from the document. Child elements are
     * appended to parent elements of deleted elements.
     * 
     * @param names Set of names of elements to be removed
     * @return Integer value of number of elements removed
     */
    public int removeElements(Set<String> names);
    
    /**
     * removeElementsRecursively searches the document for all elements with 
     * names that are in attribute names and deletes them with all their child
     * elements.
     * 
     * @param names Set of names of elements to be removed
     * @return  Integer value of number of elements removed
     */
    public int removeElementsRecursively(Set<String> names);
    
    /**
     * removeAttributesFromElements searches the document for all elements with
     * names that are in attribute names and strips them of all attributes.
     * 
     * @param names Set of names of elements from which every attribute must be removed
     * @return Integer value of number of attributes removed
     */
    public int removeAttributesfromElements(Set<String> names);
    
    /**
     * renameElements searches the document for all elements with name that is
     * in the keyset of names and renames that element to its respective name.
     * 
     * @param names Map of names and their renames
     * @return Integer value of number of elements renamed
     */
    public int renameElements(Map<String, String> names);
}
